Welcome to ‘Introduction to API Gateway’. After watching this video, you will be able to explain an API Gateway, explain the benefits of using an API Gateway, explain the drawbacks of using an API Gateway, and describe the available API Gateway products. An API Gateway is an API management
tool that sits between a client and a collection of backend services. It aggregates the various services required to
fulfill them and returns the appropriate result. So why do you use an API Gateway? An API Gateway can help you to protect
your APIs from malicious usage or overuse. Thus, you can use an authentication
service with rate limiting. It also helps to understand
how your APIs are used, using an analytics and monitoring service. In addition, you can monetize your APIs
using a billing system. A gateway also presents a single
point of contact to your various microservices and provides a
single response to a request. Finally, you can seamlessly add or remove APIs without the client’s knowledge about
the services running at the back end. Since your online store follows microservices architecture;
some of those services will be: a product information service
that shares basic information about the product such as id, name, and price, an inventory service that reveals
what’s available in stock, an order service that enables customers
to place an order for a product, and an authentication service to
validate users on the platform. So, how does a client access the microservices? This is a problem when you need
to interact with multiple APIs. An API Gateway can remove this
complication and allow you to: change hosts and their locations, increase or decrease the
number of service instances, and replace your existing service, for
example, an ordering service, with a new one. The client’s access to the
services remains undisturbed. The benefits of using an
API Gateway are as follows: It insulates the clients from how the
application is partitioned into microservices. In other words, it simplifies
the client side by moving the logic for calling multiple services
from the client to the API Gateway. It also provides the optimal API for each
client, regardless of who the client is. It reduces the number of requests or round trips. For example, the API Gateway
enables clients to retrieve data from multiple services
with a single round trip. And irrespective of how your microservices
communicate internally, an API Gateway will provide a standard protocol to
communicate with the outside world. Now, although an API Gateway provides many
benefits, it also has some drawbacks. It is another component that needs
to be developed and maintained. In addition, if not designed carefully, it can become a single point
of failure in an application. Also, a Gateway will increase
the response time due to this additional network step in the
execution of the application. There are plenty of API Gateway
products available on the market. You can choose from managed
or open-source options. From IBM, an industry-leading,
high-security application gateway called IBM
DataPower Gateway. Google has two offerings based on
your needs: Apigee or Cloud Endpoints. Microsoft Azure and
Amazon AWS also offer gateways on their platforms. And while those are managed products, in the
open source world, some famous names are: Kong, being top of the list in popularity, Apache APISIX, Tyk, which also has a managed version, and finally, Gloo, which is also
available as an enterprise version. In this video, you learned that: an API Gateway is the door
to your backend services, it enables you to plug additional services while providing your client with
unified access to your services, it hides the complexity of your
backend services from the client, it makes it easier to scale or
replace your backend services, and there are many managed and open source
API Gateway products available to choose from.